package com.hhb.leetCode.剑指offer;

public class Test53_1 {
    public static void main(String[] args) {
        int[] arr = new int[]{5,7,7,8,8,10};
        int search = Solution.search(arr, 1);
        System.out.println(search);
    }
}

class  Solution {
    public static int search(int[] nums, int target) {

        int count=0;
        for (int i = 0; i < nums.length; i++) {
            if (nums[i]==target){
                count++;
            }
        }
        return count;
    }
}
